<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>renice</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_001_014_1859">&nbsp;</a>NAME</h4><blockquote>
renice - set system scheduling priorities of running processes
</blockquote><h4><a name = "tag_001_014_1860">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

renice <b>[</b>-n <i>increment</i><b>][</b> -g| -p| -u<b>]</b><i> ID</i>...

renice <i>nice_value</i><b>[</b>-p<b>] </b><i>pid</i>...<b>[</b>-g <i>gid</i>...<b>][</b>-p <i>pid</i>...<b>][</b>-u <i>user...</i><b>]</b>

renice <i>nice_value </i>-g <i>gid</i>...<b>[</b>-g <i>gid</i>...<b>][</b>-p <i>pid</i>...<b>][</b>-u <i>user...</i><b>]</b>

renice <i>nice_value </i>-u <i>user</i>...<b>[</b>-g <i>gid</i>...<b>][</b>-p <i>pid</i>...<b>][</b>-u <i>user...</i><b>]</b>

</code>
</pre>
</blockquote><h4><a name = "tag_001_014_1861">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>renice</i>
utility requests that the
system scheduling priorities
(see
the definition of
<b>system scheduling priority</b>
in the <b>XBD</b> specification, <a href="../xbd/glossary.html"><b>Glossary</b>&nbsp;</a> )
of one or more running processes be changed.
By default, the applicable processes are specified by
their process IDs.
When a process group is specified (see
<b>-g</b>),
the request applies to all processes in the process group.
<p>
The system scheduling priority is bounded
in an implementation-dependent manner.
If the requested
<i>increment</i>
(or
<i>nice_value</i>
in the obsolescent versions)
would raise or lower the system scheduling priority of the executed
utility beyond implementation-dependent limits,
then the limit whose value was
exceeded is used.
<p>
When a user is
<i>renice</i>d,
the request applies to
all processes whose saved set-user-ID matches the user ID
corresponding to the user.
<p>
Regardless of which options are supplied or any other factor,
<i>renice</i>
will not alter the system scheduling priorities of any process
unless the user requesting such a change has appropriate privileges
to do so for the specified process.
If the user lacks
appropriate privileges to perform the requested action, the utility
will return an error status.
<p>
The saved set-user-ID of the user's process will be
checked instead of its effective user ID when
<i>renice</i>
attempts to determine the user ID of the process
in order to determine whether the user has appropriate privileges.
</blockquote><h4><a name = "tag_001_014_1862">&nbsp;</a>OPTIONS</h4><blockquote>
The
<i>renice</i>
utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> .
The obsolescent version conforms with
the following exceptions:
<ul>
<p>
<li>
The first operand,
<i>nice_value</i>,
must precede the options and
can have the appearance of a multi-digit option.
<p>
<li>
The
<b>-g</b>,
<b>-p</b>
and
<b>-u</b>
options can each take multiple option-arguments.
<p>
<li>
The
<i>pid</i>
option-argument can be used without its
<b>-p</b>
option.
<p>
</ul>
<p>
The following options are supported:
<dl compact>

<dt><b>-g</b>
<dd>Interpret all operands
(or just the
<i>gid</i>
arguments in the
obsolescent version)
as unsigned decimal integer process group IDs.

<dt><b>-n&nbsp;</b><i>increment</i>
<dd>
Specify how the system scheduling priority of the specified
process or processes is to be adjusted.
The
<i>increment</i>
option-argument is
a positive or negative decimal integer that will be used
to modify the system scheduling priority of the specified process or processes.

Positive
<i>increment</i>
values cause a lower system scheduling priority.
Negative
<i>increment</i>
values may require
appropriate privileges and will cause a higher system
scheduling priority.

<dt><b>-p</b>
<dd>Interpret all operands
(or just the
<i>pid</i>
arguments in the obsolescent version)
as unsigned decimal integer process IDs.
The
<b>-p</b>
option is the default if no options are specified.

<dt><b>-u</b>
<dd>Interpret all operands
(or just the
<i>user</i>
arguments in the obsolescent version)
as users.
If a user exists with a user name equal to the operand,
then the user ID of that user will be used in further processing.
Otherwise, if the
operand represents an unsigned
decimal integer, it will be used as the numeric user ID of the user.

</dl>
</blockquote><h4><a name = "tag_001_014_1863">&nbsp;</a>OPERANDS</h4><blockquote>
The following operands are supported:
<dl compact>

<dt><i>ID</i><dd>A process ID, process group ID or user name/user ID,
depending on the option selected.

<dt><i>nice_value</i><dd>
The value specified is taken as
the actual system scheduling priority,
rather than as an increment to the existing system scheduling priority.
Specifying a scheduling priority higher than that of the
existing process may require appropriate privileges.

</dl>
</blockquote><h4><a name = "tag_001_014_1864">&nbsp;</a>STDIN</h4><blockquote>
Not used.
</blockquote><h4><a name = "tag_001_014_1865">&nbsp;</a>INPUT FILES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_1866">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>
The following environment variables affect the execution of
<i>renice</i>:
<dl compact>

<dt><i>LANG</i><dd>Provide a default value for the internationalisation variables
that are unset or null.
If
<i>LANG</i>
is unset or null, the corresponding value from the
implementation-dependent default locale will be used.
If any of the internationalisation variables contains an invalid setting, the
utility will behave as if none of the variables had been defined.

<dt><i>LC_ALL</i><dd>
If set to a non-empty string value,
override the values of all the other internationalisation variables.

<dt><i>LC_CTYPE</i><dd>
Determine the
locale for the interpretation of sequences of bytes of text data as
characters (for example, single- as opposed to multi-byte characters
in arguments).

<dt><i>LC_MESSAGES</i><dd>
Determine the locale that should be used to affect
the format and contents of diagnostic
messages written to standard error.

<dt><i>NLSPATH</i><dd>
Determine the location of message catalogues
for the processing of
<i>LC_MESSAGES .
</i>
</dl>
</blockquote><h4><a name = "tag_001_014_1867">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_1868">&nbsp;</a>STDOUT</h4><blockquote>
Not used.
</blockquote><h4><a name = "tag_001_014_1869">&nbsp;</a>STDERR</h4><blockquote>
Used only for diagnostic messages.
</blockquote><h4><a name = "tag_001_014_1870">&nbsp;</a>OUTPUT FILES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_1871">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_1872">&nbsp;</a>EXIT STATUS</h4><blockquote>
The following exit values are returned:
<dl compact>

<dt>0<dd>Successful completion.

<dt>&gt;0<dd>An error occurred.

</dl>
</blockquote><h4><a name = "tag_001_014_1873">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_1874">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_1875">&nbsp;</a>EXAMPLES</h4><blockquote>
<ol>
<p>
<li>
Adjust the system scheduling priority so
that process IDs 987 and 32 would have a lower scheduling priority:
<pre>
<code>
renice -n 5 -p 987 32
</code>
</pre>
<p>
<li>
Adjust the system scheduling priority so
that group IDs 324 and 76 would have a higher scheduling priority,
if the user has the appropriate privileges to do so:
<pre>
<code>
renice -n -4 -g 324 76
</code>
</pre>
<p>
<li>
Adjust the system scheduling priority so
that numeric user ID 8 and user
<b>sas</b>
would have a lower scheduling priority:
<pre>
<code>
renice -n 4 -u 8 sas
</code>
</pre>
<p>
</ol>
<p>
Useful nice values on historical systems include
19 or 20 (the affected processes will run only when nothing else
in the system attempts to run),
0 (the base scheduling priority),
and any negative number (to make processes run faster).
</blockquote><h4><a name = "tag_001_014_1876">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_1877">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="nice.html">nice</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
